package com.example.front.arrange;

import com.alibaba.fastjson.JSON;
import lombok.extern.slf4j.Slf4j;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Slf4j
public class TaskFactory {
    private static Map<Class<? extends AbstractRootTask>, List<Config>> arrangeConfigMap = new HashMap<>();

    public static List<Config> getArrangeConfigList(Class<? extends AbstractRootTask> contextClass) {
        return arrangeConfigMap.get(contextClass);
    }

    public static void setArrangeConfig(Map<Class<? extends AbstractRootTask>, List<Config>> configMap) {
        log.info("configMap:{}", JSON.toJSONString(configMap));
        arrangeConfigMap.putAll(configMap);
    }
}
